home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / john / hc_showd.hqx / ShowDialog XCMD 1.4 / card_2886.txt < prev    next >
Encoding:
Text File  |  1989-08-30  |  3.2 KB  |  112 lines

  1. -- card: 2886 from stack: in.4
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2607
  5. -- name: 
  6.  
  7.  
  8. -- part 6 (button)
  9. -- low flags: 00
  10. -- high flags: 2000
  11. -- rect: left=21 top=34 right=57 bottom=52
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 19678 / 19678
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: info
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   lock screen
  23.   unlock screen with zoom out
  24.   CreditsDialog 4747,1040,1041
  25. end mouseUp
  26.  
  27. -- This is a knock-off, but fully functional, XCMD that displays
  28. -- two PICTs in sequence.  It makes a nifty "About..." dialog.
  29.  
  30. -- It's parameters are:
  31. -- CreditsDialog <DLOG resource ID>,<1st PICT ID#>,<2ed PICT ID#>
  32. -- As always, there are two other optional parameters:
  33. -- <top coord>,<left coord>
  34.  
  35. -- If the specified PICTs are missing, the XCMD beeps.
  36.  
  37.  
  38.  
  39. -- part 14 (field)
  40. -- low flags: 01
  41. -- high flags: 0000
  42. -- rect: left=469 top=48 right=62 bottom=503
  43. -- title width / last selected line: 0
  44. -- icon id / first selected line: 0 / 0
  45. -- text alignment: 0
  46. -- font id: 3
  47. -- text size: 10
  48. -- style flags: 0
  49. -- line height: 13
  50. -- part name: 
  51.  
  52.  
  53. -- part 17 (button)
  54. -- low flags: 00
  55. -- high flags: 0001
  56. -- rect: left=8 top=306 right=328 bottom=47
  57. -- title width / last selected line: 0
  58. -- icon id / first selected line: 0 / 0
  59. -- text alignment: 1
  60. -- font id: 0
  61. -- text size: 12
  62. -- style flags: 0
  63. -- line height: 16
  64. -- part name: New Button
  65.  
  66.  
  67. -- part 16 (field)
  68. -- low flags: 01
  69. -- high flags: 0000
  70. -- rect: left=5 top=318 right=332 bottom=166
  71. -- title width / last selected line: 0
  72. -- icon id / first selected line: 0 / 0
  73. -- text alignment: 0
  74. -- font id: 3
  75. -- text size: 9
  76. -- style flags: 0
  77. -- line height: 12
  78. -- part name: 
  79.  
  80.  
  81. -- part contents for background part 2
  82. ----- text -----
  83. ShowDialog XCMD
  84.  
  85. -- part contents for background part 1
  86. ----- text -----
  87.  
  88. One of problems with creating professional stacks in HyperCard is that HyperCard's implementation of dialog boxes (the "ask" and "answer" boxes) are too restrictive (too small) as well as being less than glamorous (no icon).  One way around this is to fudge a dialog box with HyperTalk, but this is a kluge, at best (you can't have a default button).
  89.  
  90. ShowDialog XCMD is an external command that will allow you to display ANY type of dialog or alert that can contain ANY number of buttons, ANY amount of text, and ANY number of icons or PICT resources.  You decide whether the dialog or alert is to have a default (outlined) button.  You can have as many fields of static text as you wish and can modify any two of these on the fly (in the XCMD parameter list).
  91.  
  92. You can have up to two fields of editable text that the user can type into.  One of these fields can contain a default text string (that you specify in the parameter list).  Your dialog can have as many radio buttons as you want or can have a popup menu or a single check box.
  93.  
  94. You use ResEdit to create the necessary DLOG/DITL resources that allow ShowDialog to function.
  95.  
  96. -- part contents for card part 14
  97. ----- text -----
  98. v 1.4
  99.  
  100. -- part contents for card part 16
  101. ----- text -----
  102. Copyright┬⌐ 1988 by Jay Hodgdon
  103.  
  104. -- part contents for background part 7
  105. ----- text -----
  106. 1
  107.  
  108. -- part contents for background part 3
  109. ----- text -----
  110.  
  111.  
  112.